home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / DRIVES.SWG / 0004_DETCDRIV.PAS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  399b  |  14 lines

  1. {│o│  How do I detect active drives in Pascal?  My Program would │o║
  2. │o│  crash if you Typed in a non-existent drive as either       │o║
  3. │o│  source or destination.                                     │o║
  4. }
  5. Uses Dos;
  6. Var sr : SearchRec;
  7. begin
  8.   findfirst('k:\*.*',AnyFile,sr);
  9.   if Doserror=0
  10.   then Writeln('It is there all right!')
  11.   else Writeln('Sorry, could not find it.');
  12. end.
  13.  
  14.